/*
 * Ng4_FjcCommon.hxx
 *
 *  Created on: 2015-4-29
 *      Author: Administrator
 */


#ifndef NG4_FJCCOMMON_HXX_
#define NG4_FJCCOMMON_HXX_

#include <emh.h>
#include <sa/am.h>
#include <tccore/aom_prop.h>
#include <tccore/grm.h>
#include <workspaceobject.h>

#ifdef _WIN32
# define FILE_SEP                           "\\"
#else
# define FILE_SEP                          "/"
#endif

# define CONST_FILE_WRITE                       "w"
#define ERRORBASE												9191000
#define ErrorCodeForNULL									ERRORBASE + 802
#define ErrorCodeForFile									ERRORBASE + 803

#define ITK_CALL( argument )						                                \
{									                                        		\
		int retcode = argument;																	         														\
		if ( retcode != ITK_ok )													\
		{																			\
			char* s;                                                        		\
			TC_write_syslog( " "#argument "\n" );                                   \
			TC_write_syslog( "  returns [%d]\n", retcode );                         \
			EMH_ask_error_text (retcode, &s);										\
			TC_write_syslog( "  Teamcenter Unified Error: [%s]\n", s);         \
			TC_write_syslog( "  in file ["__FILE__"], line [%d]\n\n", __LINE__ );   \
			if (s != 0) MEM_free (s);                                       		\
		}                                                                   		\
}

namespace TC9 {

class Ng4_FjcCommon {
public:
	Ng4_FjcCommon();
	virtual ~Ng4_FjcCommon();
	static int ng4_isTwoDString(tag_t tBo, bool *bpDwg);
};

}
#endif /* NG4_FJCCOMMON_HXX_ */
